package org.flexharmony.harmonizer.config;

import java.io.File;
import java.util.List;

/**
 * Configuration used when harmonizing ActionScript classes.
 * 
 * @author Corey Baswell
 *
 */
public class HarmonyConfiguration
{
  /**
   * The root directory for ActionScript files.
   */
  private File flexSrcDir;

  /**
   * If true only updates that would result in adds will be executed on on ActionScript
   * classes. If false then deletions (ex. removing an existing property from
   * a class) will occur too.
   */
  private boolean additiveOnly = true;
  
  /**
   * If true then every time an ActionScript class file is update the properties
   * will be written out from scratch. This can result in comments and possible
   * client side methods from being deleted. If false all updates will be added
   * to the bottom of the class file.
   */
  private boolean cleanUpdates = false;
  
  private List<TypeMapping> typeMappings;
  
  public HarmonyConfiguration()
  {}

  public File getFlexSrcDir()
  {
    return flexSrcDir;
  }

  public void setFlexSrcDir(File flexSrcDir)
  {
    this.flexSrcDir = flexSrcDir;
  }

  public boolean isAdditiveOnly()
  {
    return additiveOnly;
  }

  public void setAdditiveOnly(boolean additiveOnly)
  {
    this.additiveOnly = additiveOnly;
  }

  public boolean isCleanUpdates()
  {
    return cleanUpdates;
  }

  public void setCleanUpdates(boolean cleanUpdates)
  {
    this.cleanUpdates = cleanUpdates;
  }

  public List<TypeMapping> getTypeMappings()
  {
    return typeMappings;
  }

  public void setTypeMappings(List<TypeMapping> typeMappings)
  {
    this.typeMappings = typeMappings;
  }
}
